import request from '@/utils/request'

// 查询合作商户列表
export function listCooperativemerchant(query) {
  return request({
    url: '/system/cooperativemerchant/list',
    method: 'get',
    params: query
  })
}

// 查询合作商户详细
export function getCooperativemerchant(merchantId) {
  return request({
    url: '/system/cooperativemerchant/' + merchantId,
    method: 'get'
  })
}

// 新增合作商户
export function addCooperativemerchant(data) {
  return request({
    url: '/system/cooperativemerchant',
    method: 'post',
    data: data
  })
}

// 修改合作商户
export function updateCooperativemerchant(data) {
  return request({
    url: '/system/cooperativemerchant',
    method: 'put',
    data: data
  })
}

// 删除合作商户
export function delCooperativemerchant(merchantId) {
  return request({
    url: '/system/cooperativemerchant/' + merchantId,
    method: 'delete'
  })
}

// 导出合作商户
export function exportCooperativemerchant(query) {
  return request({
    url: '/system/cooperativemerchant/export',
    method: 'get',
    params: query
  })
}